import request from "../utils/request";

export const getAllGroupMessageAPI=()=>{
  return request({
    url:'/ws/getAllGroupMessage',
    method:'get',
  })
}

export const sendAudioAPI =(audioBlob)=>{
  const formData = new FormData();
  formData.append('file', audioBlob, 'recording.wav');
  return request({
      url:'/ws/recognize',
      method:'post',
      data:formData,
      headers: {
          'Content-Type': 'multipart/form-data' // 上传文件时需要设置这个请求头
      }
  })
};